package com.cskaoyan.market.service.wx;

import com.cskaoyan.market.db.domain.MarketGoodsProduct;
import com.cskaoyan.market.db.domain.MarketGoodsProductExample;
import com.cskaoyan.market.db.mapper.MarketGoodsProductMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WxGoodsProductServiceImpl implements WxGoodsProductService {
    @Autowired
    MarketGoodsProductMapper productMapper;
    @Override
    public List<MarketGoodsProduct> queryProducts(Integer id) {
        MarketGoodsProductExample marketGoodsProductExample = new MarketGoodsProductExample();
        MarketGoodsProductExample.Criteria criteria = marketGoodsProductExample.createCriteria();
        criteria.andGoodsIdEqualTo(id);
        return productMapper.selectByExample(marketGoodsProductExample);

    }
}

